#pragma once
#include "ThridCode\\LaserAutoCode.h"

// CComLaserCodeDlg dialog
#define			TIMER_TEST			10001
class CComLaserCodeDlg : public CDialogEx
{
	DECLARE_DYNAMIC(CComLaserCodeDlg)

public:
	CComLaserCodeDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CComLaserCodeDlg();

// Dialog Data
	enum { IDD = IDD_COMMON_LASER_CODE_DLG };

	afx_msg void OnLaserCodeNew();
	afx_msg void OnLaserCodeEdit();
	afx_msg void OnLaserCodeDelete();
	afx_msg void OnLaserCodeSave();

	CComLaserCode * m_LaserCode;
	CListBox m_ListLaserCode;
	CListBox m_ListElement;

	BOOL m_bCodeTest;
	void ShowElementList();
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	void UpdateListAndData(int nId = -1);
	virtual BOOL OnInitDialog();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	afx_msg void OnClose();
	afx_msg LRESULT OnLaserCodeAPPLY(WPARAM wParam, LPARAM lParam);
	afx_msg void OnBnClickedBtnElementAdd();
	afx_msg void OnBnClickedBtnElementAlter();
	afx_msg void OnBnClickedBtnElementDel();
	afx_msg void OnBnClickedBtnElementPre();
	afx_msg void OnBnClickedBtnElementNext();
	afx_msg void OnBnClickedBtnElementSave();
	afx_msg void OnBnClickedBtnElementCancle();
	afx_msg void OnLbnDblclkListLaserCode();
	afx_msg void OnLbnSelchangeListLaserCode();
	afx_msg void OnBnClickedBtnCodeTest();
	afx_msg void OnTimer(UINT_PTR nIDEvent);
};
